package com.hksj.wlw.mapper;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hksj.common.config.annotation.DS_TAOS;
import com.hksj.wlw.query.WaterLeakDeviceQuery;
import com.hksj.wlw.query.WaterLeakHistoryQuery;
import com.hksj.wlw.vo.WaterLeakCountVO;
import com.hksj.wlw.vo.WaterLeakDeviceHistoryVO;
import com.hksj.wlw.vo.WaterLeakDeviceVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WaterLeakDeviceMapper {
    //分页查询
    List<WaterLeakDeviceVO> queryWaterLeakDeviceByPage(@Param("page") IPage<WaterLeakDeviceVO> page,@Param("query") WaterLeakDeviceQuery query);

    //漏水历史数据查询
    @DS_TAOS
    List<WaterLeakDeviceHistoryVO> queryWaterLeakHistoryByPage(@Param("query")WaterLeakHistoryQuery query,@Param("tableName")String tableName);

    //漏水历史数据总数查询
    @DS_TAOS
    Long queryWaterLeakHistoryCount(@Param("query")WaterLeakHistoryQuery query,@Param("tableName") String tableName);

    //设备漏水总数查询统计
    List<WaterLeakCountVO> queryWaterLeakNumCount(@Param("query")WaterLeakHistoryQuery query);

}
